import java.util.Arrays;

public class SolutionInterview16_14 {
    public int[] bestLine(int[][] points) {
        int ans=2,l=0,r=1;
        for (int i=0;i<points.length;i++){
            for (int j=i+1;j<points.length;j++){
                int x=points[j][0]-points[i][0],y=points[j][1]-points[i][1];
                int t=2;
                for (int k=j+1;k<points.length;k++){
                    int kx=points[k][0]-points[i][0],ky=points[k][1]-points[i][1];
                    if (ky*x-y*kx==0){
                        t++;
                    }
                }
                if (t>ans){
                    ans=t;
                    l=i;
                    r=j;
                }
            }
        }
        return new int[]{l,r};
    }

    public static void main(String[] args) {
        System.out.println(Arrays.toString(new SolutionInterview16_14().bestLine(new int[][]{{0, 0}, {1, 1}, {1, 0}, {2, 0}})));
    }
}
